Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agora): configure agora-app dev server proxy to handle agora-api requests (AG-1707) #3022

Merged
merged 1 commit into from
Mar 1, 2025

Conversation

hallieswan
Copy link
Collaborator

@hallieswan hallieswan commented Feb 28, 2025

Description

We would like to take advantage of live reloading when developing locally in Agora by serving the app with the development server and running all other services in their Docker containers. However, the app requests to the API result in CORS errors. This PR configures the Angular development server proxy to handle API requests.

Related Issue

Validation

Setup:

  • Build and run containerized stack: agora-build-images && nx run agora-apex:serve-detach
  • Remove app container: docker rm -f agora-app
  • Start app with dev server: nx run agora-app:serve
  • View homepage at https://localhost:4200

Validate app can fetch data from API:

  • data version and file id should be displayed in footer, e.g. something like this:
    image
  • No CORS errors in the browser console

Validate live reloading:

  • Make a change to copy in the homepage template here: libs/agora/home/src/lib/home.component.html
  • Save file
  • App should re-compile and browser page should reload and show changed homepage copy

@hallieswan hallieswan marked this pull request as ready for review February 28, 2025 21:26
@hallieswan hallieswan requested a review from a team as a code owner February 28, 2025 21:26
Copy link
Contributor

@sagely1 sagely1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! No need to use any CORS extensions as a stopgap anymore.

@hallieswan hallieswan added this pull request to the merge queue Mar 1, 2025
Merged via the queue into Sage-Bionetworks:main with commit e8d6476 Mar 1, 2025
13 of 15 checks passed
@hallieswan hallieswan deleted the agora/AG-1707 branch March 1, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants